package week2

import (
	"errors"
	"fmt"
)

func Positive(n int) (bool, error){
	if n == 0 {
		return false, errors.New("undefined")
	}
	return n>-1, nil
}

func Check(n int){
	pos, ok := Positive(n)
	if ok != nil {
		fmt.Println(n, ok)
		return
	}
	if pos{
		fmt.Println(n, "positive")
	} else {
		fmt.Println(n, "negative")
	}
}

func T3(){
	Check(1)
	Check(0)
	Check(-1)
}